294 ◾ Bioinformatics
qiime taxa barplot \
--i-table dada2/table_feat_sample_freq_filtered_yoga_dada2.qza \
--i-taxonomy dada2/nb_tax_yoga_dada2.qza \
--m-metadata-file data/sample-metadata.tsv \
--o-visualization dada2/nx_tax_yoga_dada2_barplot.qzv
qiime tools view dada2/nx_tax_yoga_dada2_barplot.qzv
The taxonomy barplot (Figure 7.16) provides an interactive graphic interface to view the
bacterial taxa distribution in each sample as shown by the color keys. The bar width can
be changed by the slider bar on the top left. You can also use the dropdown menus on
the top (taxonomic levels, color palette, and Sort Sample by) to change the view and view
taxa distribution at specific taxonomic level or sort sample by a taxon or an experimental
group.
Earlier, we discussed how to filter the feature table to remove samples or features (with
low frequency). However, after viewing the taxonomy report, you may decide to focus on
a specific taxon or taxa across all samples. To achieve that you can use “taxa filter-table”
to create a new feature table for taxa that you wish to study. Filtering can be applied using
that method to retain only specific taxa using “--p-include” or to remove specific taxa using
“--p-exclude” or can be applied together. Multiple taxa are provided to the argument as
comma-separated list. By default, the terms provided for “--p-include” or “--p-exclude”
will match if they are contained in a taxonomic annotation. However, if you need the terms
match exactly the complete taxonomic annotation, then you can use “--p-mode exact”
parameter as well. Run “qiime taxa filter-table --help” to read more about the usage and
parameters. The “taxa” plugin output is a new feature table with the selected taxa. For
example, assume that you wish to retain only features that contain a phylum level classifi-
cation. So, you can use “--p-include p__” as follows:
FIGURE 7.16 Taxonomy bar plot (the samples are sorted by group).